package cn.homework.service.impl;

import cn.homework.dao.LoginDao;
import cn.homework.dao.impl.LoginDaoImpl;
import cn.homework.domain.Admin;
import cn.homework.domain.Customers;
import cn.homework.service.LoginService;

/**
 * @author ACT
 */
public class LoginServiceImpl implements LoginService {
    LoginDao dao = new LoginDaoImpl();

    @Override
    public Customers loginCustomers(Customers customers) {
        return dao.findCustomerByNameAndPassword(customers);
    }

    @Override
    public Admin loginAdmin(Admin admin) {
        return dao.findAdminByNameAndPassword(admin);
    }

    @Override
    public Customers judgmentCustomer(Customers customers) {
        return dao.findCustomerByCondition(customers);
    }

    @Override
    public Admin judgmentAdmin(Admin admin) {
        return dao.findAdminByCondition(admin);
    }
}
